Profile    Mohammed Shiroz Status   Loading  
Logo
Share This

My eloquent
blog and Updates

It's my personal blog and my post about what was my interested in. Not regularly. If you have any questions any discussion, I'm happy you get in touch with me, and try to answer as many as possible!

Blog
Let's See
Back to blog
Filter by:
Tags
//Article

Six Mistakes With Laravel Eloquent Events and Observers (and the Fixes)

Six Mistakes With Laravel Eloquent Events and Observers (and the Fixes)

Blog Summary

Observers feel like magic until an import sends hundreds of emails and a bulk update skips your audit log. Six common Eloquent event mistakes, why each one happens, and the fix in Laravel 12.

Read more
  • 48
  • 86
  • 23

Eloquent Relationships You Might Be Underusing (and the Queries They Replace)

Eloquent Relationships You Might Be Underusing (and the Queries They Replace)

Blog Summary

Most Laravel apps use hasMany and belongsTo, then hand-write everything else. hasManyThrough, latestOfMany, withSum, whereRelation and morphs can replace pluck-and-loop code with cleaner, faster queries.

Read more
  • 149
  • 116
  • 21

PHP Performance Mistakes Hiding in Your Loops and Queries

PHP Performance Mistakes Hiding in Your Loops and Queries

Blog Summary

Slow PHP is rarely slow because of PHP. It's usually a query inside a loop, a lookup repeated ten thousand times, or a whole table loaded into memory. Six common mistakes with before-and-after code, plus one myth you can stop worrying about.

Read more
  • 116
  • 22
  • 19

Mass Assignment in Laravel: The Bug Hiding in Your create() Call

Mass Assignment in Laravel: The Bug Hiding in Your create() Call

Blog Summary

One extra field in a registration request, is_admin=1, and a stranger is an administrator. How mass assignment works in Laravel, why $guarded = [] plus $request->all() is a trap, and the habits that close the hole.

Read more
  • 69
  • 113
  • 25

Five Eloquent Mistakes That Quietly Slow Down Your Laravel App

Five Eloquent Mistakes That Quietly Slow Down Your Laravel App

Blog Summary

Eloquent makes database code read like English, which is exactly why its slowest patterns look so innocent. Five common mistakes, why each one hurts as your tables grow, and the one-line fix for every one of them.

Read more
  • 37
  • 92
  • 21

Laravel N+1 Queries: How to Spot Them and Kill Them for Good

Laravel N+1 Queries: How to Spot Them and Kill Them for Good

Blog Summary

Your page was fast with test data and slow in production, and the code never changed. Meet the N+1 query: where it hides in Laravel, how to find it, and the one line that stops it coming back.

Read more
  • 32
  • 25
  • 11

01. About Shiroz

Mohammed Shiroz

Hi, I'm Mohammed Shiroz, a software engineer and AI enthusiast from Sri Lanka who turns ideas into intelligent, real-world solutions. With over 9 years of hands-on experience, I currently lead real estate ERP development at Kate Group, a...

03.My Projects

04. Categories

Ready To Start Your Project ?

Get in Touch
Close